package com.dylon.system.domain;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

@Data
public class SysModule extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long    moduleId;
    private String  moduleName; //'模块名称',
    private Long    parentId;   //'所属父模块',
    private Long    projectId;  //'所属项目',
    private String  status;  //'状态：0开启，1完成，2弃用',
    private String  moduleUrl; //'模块访问路径',
    private Integer orderNum; //'排序号',
    private String  path; //

    private String  parentName; //父节点名称
    private String  projectName; //项目点名称

    private List<SysModule> children = new ArrayList<>();

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("moduleId", getModuleId())
                .append("moduleName", getModuleName())
                .append("parentId", getParentId())
                .append("projectId", getProjectId())
                .append("status", getStatus())
                .append("moduleUrl", getStatus())
                .append("orderNum", getOrderNum())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("path", getPath())
                .append("parentName", getParentName())
                .append("projectName", getProjectName())
                .toString();
    }
}
